package applet.swing;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

class SwingLogin extends JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	SwingLogin() {
		// Defining the layout
		this.setLayout(null);

		// Define the components
		JLabel label0 = new JLabel("Login");
		JLabel label1 = new JLabel("Username");
		JLabel label2 = new JLabel("Password");
		JTextField textField = new JTextField();
		JPasswordField pswdField = new JPasswordField();
		JButton button1 = new JButton("Submit");
		JButton button2 = new JButton("reset");

		// Set boundary
		label0.setBounds(110, 5, 90, 30);
		label1.setBounds(60, 35, 90, 30);
		label2.setBounds(60, 65, 90, 30);
		textField.setBounds(160, 35, 90, 30);
		pswdField.setBounds(160, 65, 90, 30);
		button1.setBounds(60, 100, 90, 30);
		button2.setBounds(160, 100, 90, 30);

		// Adding the components to the frame
		this.add(label0);
		this.add(label1);
		this.add(textField);
		this.add(label2);
		this.add(pswdField);
		this.add(button1);
		this.add(button2);
	}

	public static void main(String args[]) {
		SwingLogin obj = new SwingLogin();
		obj.setVisible(true);
		obj.setSize(300, 200);
		obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}
